/**
 * 
 */
var url = 'index1.jsp?inc=./Community/';
function guestBook_Delete(rno, page){
	
	var f = document.guestBook_frm;
	
	var conf = confirm("삭제 하시겠습니까?");
	if(conf){
		f.nowPage.value = page;
		f.guestbook_rno.value = rno;
		f.action =url+ "guestBook.jsp?tmp=1";
		f.submit();
	}else{
		f.nowPage.value = page;
		f.guestbook_rno.value = rno;
		f.action =url+ "guestBook.jsp?tmp=0";
		f.submit();
	}
}

function init(){
	
	document.getElementById("guestBook_button").onclick = function(){
		var frm = document.ifrm;
		
		if(frm.guestbook_mid.value == ""){
			alert("로그인을 해주세요.");
			location.href = url+ "guestBook.jsp";
			frm.guestbook_contents.focus();
		}else{
			frm.action =url+ "guestBook.jsp?tmp=2";
			frm.submit();
		}
	}
	
	document.getElementById("guestBook_findButton").onclick = function(){

		var frm = document.ffrm;
		
		frm.find.value;
		frm.action = url+ "guestBook.jsp";
		frm.submit();
	}
}

function goPage(page){
	
	var ff = document.guestBook_frm;
	ff.nowPage.value = page;
	ff.find.value = document.guestBook_frm.find.value;
	
	ff.action = url+"guestBook.jsp";
	ff.submit();
}
